<%@ page language="java" import="java.util.*" isELIgnored="false"
	contentType="text/html; charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	session.setAttribute("path", path);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>控制台页面_企业工资管理系统</title>
<link rel="stylesheet" href="${path}/resources/css/style.default.css"
	type="text/css" />

<script type="text/javascript"
	src="${path}/resources/js/plugins/jquery-1.7.min.js"></script>
<script type="text/javascript"
	src="${path}/resources/js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript"
	src="${path}/resources/js/plugins/jquery.cookie.js"></script>
<script type="text/javascript"
	src="${path}/resources/js/plugins/jquery.uniform.min.js"></script>
<script type="text/javascript"
	src="${path}/resources/js/plugins/jquery.validate.min.js"></script>
<script type="text/javascript"
	src="${path}/resources/js/plugins/jquery.tagsinput.min.js"></script>
<script type="text/javascript"
	src="${path}/resources/js/plugins/charCount.js"></script>
<script type="text/javascript"
	src="${path}/resources/js/plugins/ui.spinner.min.js"></script>
<script type="text/javascript"
	src="${path}/resources/js/plugins/chosen.jquery.min.js"></script>
	<script type="text/javascript" src="${path}/resources/js/plugins/uploadPreview.min.js"></script>
<script type="text/javascript" src="${path}/resources/js/general.js"></script>
<script type="text/javascript" src="${path}/resources/js/profile.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="${path}/js/plugins/excanvas.min.js"></script><![endif]-->
<!--[if IE 9]>
    <link rel="stylesheet" media="screen" href="css/style.ie9.css"/>
<![endif]-->
<!--[if IE 8]>
    <link rel="stylesheet" media="screen" href="css/style.ie8.css"/>
<![endif]-->
<!--[if lt IE 9]>
	<script src="${path}/js/plugins/css3-mediaqueries.js"></script>
<![endif]-->
<style type="text/css">
label {
	padding: 0px 20px 0px 0px !important;
	width: 400px;
	font-weight: bold;
}

.stdform {
	width: 600px;
}
</style>

</head>

<body class="withvernav">
	<div class="bodywrapper">
		<div class="topheader">
			<div class="left">
				<h1 class="logo">
					企业<span>工资管理系统</span>
				</h1>
				<br clear="all" />
			</div>
			<!--left-->

			<div class="right">
				<div class="userinfo">
					<img src="${path}/resources/images/thumbs/avatar.png" alt="" />
					<span> ${employee.empNo}</span>
				</div>
				<!--userinfo-->

				<div class="userinfodrop">
					<div class="avatar">
						<a href=""><img src="${path}/resources/images/thumbs/avatarbig.png" alt="" /></a>
						<div class="changetheme">
							切换主题: <br /> <a class="default"></a> <a class="blueline"></a> <a
								class="greenline"></a> <a class="contrast"></a> <a
								class="custombg"></a>
						</div>
					</div>
					<!--avatar-->
					<div class="userdata">
						<h4>${employee.empName}</h4>
						<span class="email">${employee.empEmail}</span>
						<ul>
							<li><a href="${path}/employee/editProfile">编辑资料</a></li>
							<li><a href="${path}/employee/password">修改密码</a></li>
							<li><a href="#">帮助</a></li>
							<li><a href="${path}/employee/logout">退出</a></li>
						</ul>
					</div>
					<!--userdata-->
				</div>
				<!--userinfodrop-->
			</div>
			<!--right-->
		</div>
		<!--topheader-->


		<div class="header">
			<ul class="headermenu">
				<li class="current"><a href="${path}/employee/profile"><span
						class="icon icon-flatscreen"></span>首页</a></li>
				<li><a href="${path}/department"><span
						class="icon icon-pencil"></span>部门信息管理</a></li>
				<li><a href="${path}/post"><span
						class="icon icon-message"></span>岗位信息管理</a></li>
				<li><a href="${path}/employee"><span
						class="icon icon-pencil"></span>员工信息管理</a></li>
				<c:if test="${employee.isAdmin == 1 }">
				<li><a href="${path}/timecard"><span
						class="icon icon-speech"></span>考勤信息管理</a></li>
				</c:if>
				<c:if test="${employee.isAdmin == 0 }">
				<li><a href="${path}/timecard/myTimecards"><span
						class="icon icon-speech"></span>考勤信息管理</a></li>
				</c:if>
				<li><a href="${path}/bonus"><span 
						class="icon icon-chart"></span>奖金信息管理</a></li>
				<li><a href="${path}/salaryRecord"><span 
						class="icon icon-message"></span>工资信息管理</a></li>
			</ul>
		</div>
		<!--header-->

		<div class="vernav2 iconmenu">
			<ul>
				<li><a href="${path}/department" class="widgets">部门信息管理</a></li>
	        	<li><a href="${path}/post" class="support">岗位信息管理</a></li>
	            <li><a href="${path}/employee" class="tables">员工信息管理</a></li>
	            <li><a href="#attend" class="calendar">考勤信息管理</a>
	            	<span class="arrow"></span>
	            	<ul id="attend">
	            		<c:if test="${employee.isAdmin == 1 }">
	               		<li><a href="${path}/timecard">考勤-日历模式</a></li>
	               		</c:if>
	               		<c:if test="${employee.isAdmin == 0 }">
	               		<li><a href="${path}/timecard/myTimecards">考勤-日历模式</a></li>
	               		</c:if>
	                    <li><a href="${path}/timecard/table">考勤-表格模式</a></li>
	                </ul>
            	</li>
	            <li><a href="${path}/bonus" class="tables">奖金信息管理</a>
	            </li>
	            <li><a href="#salary" class="widgets">工资信息管理</a>
	            	<span class="arrow"></span>
	            	<ul id="salary">
	            		<c:if test="${employee.isAdmin == 1 }">
	            		 <li><a href="${path}/salaryRecord/calPre">工资结算</a></li>
	            		 </c:if>
	                    <li><a href="${path}/salaryRecord">工资记录</a></li>
	                    <c:if test="${employee.isAdmin == 1 }">
	                    <li><a href="${path}/postSalary">工资结构调整</a></li>
	                    </c:if>
	                    <c:if test="${employee.isAdmin == 0 }">
	                    <li><a href="${path}/postSalary/myStructure">我的工资结构</a></li>
	                    </c:if>
	                </ul>
            	</li>
        	</ul>
			<a class="togglemenu"></a> <br />
			<br />
		</div>
		<!--leftmenu-->

		<div class="centercontent">

			<div class="pageheader">
				<h1 class="pagetitle">修改资料</h1>
				<span class="pagedesc">这是修改个人资料页面，员工可以修改个人信息。</span>

				<ul class="hornav">
					<li class="current"><a>修改信息</a></li>
				</ul>
			</div>
			<!--pageheader-->

			<div id="contentwrapper" class="contentwrapper">
				<c:if test="${editStatus=='success'}">
					<div class="notibar msgsuccess">
						<a class="close"></a>
						<p>修改个人信息成功！</p>
					</div>
				</c:if>
				<c:if test="${editStatus=='error'}">
					<div class="notibar msgerror">
						<a class="close"></a>
						<p>修改个人信息失败！</p>
					</div>
				</c:if>
				<div id="editProfile" class="subcontent">
					<form id="editProfileForm" class="stdform" method="post" enctype="multipart/form-data"
						action="${path }/employee/saveProfile">
						<input type="hidden" name="employee.empId" id="employeeId" value="${employee.empId}"/>
						<div style="float: right; width: 160px">
							<img id="empPhoto"
								src="${path}/resources/employeePic/${employee.empPhoto}"
								style="width: 120px; height: 150px; margin-right: 20px"></img> <input
								type="file" id="upload" name="empPic" />
						</div>
						<p>
							<label>员工编号：</label> <span class="field"><input
								type="text" readonly="readonly"
								style="width: 25%; background-color: #CCCCCC"
								name="employee.empNo" id="empNo" value="${employee.empNo}"/></span>
						</p>

						<p>
							<label>员工姓名：</label> <span class="field"><input
								type="text" style="width: 50%;" value="${employee.empName}"
								id="empName" name="employee.empName"/></span>
						</p>
						<p>
							<label>所属部门：</label> <span class="field"> <select 
								name="deptId" id="deptId" style="width: 50%;">
									<option value="">请选择</option>
									<c:forEach items="${departments}" var="department">
										<option value="${department.deptId}" <c:if test="${employee.deptId==department.deptId }"> selected </c:if>>${department.deptName}</option>
									</c:forEach>
							</select>
							</span>
						</p>
						<p style="width:70%">
							<label>所属岗位：</label> <span class="field"> <select
								name="employee.postId" id="postId" style="width: 95%;">
									<option value="">请选择</option>
									<c:forEach items="${posts}" var="post">
										<option value="${post.postId}" <c:if test="${employee.postId==post.postId }"> selected </c:if>>${post.postName}</option>
									</c:forEach>
							</select>
							</span>
						</p>

						<p>
							<label>性别：</label> <span class="formwrapper"> 
							<input <c:if test="${employee.empGender=='男' }"> checked="checked" </c:if>
								type="radio" id="boy" name="employee.empGender" value="男" />男&nbsp;
								&nbsp;&nbsp; &nbsp; 
							<input <c:if test="${employee.empGender=='女' }"> checked="checked" </c:if>
							type="radio" id="girl" name="employee.empGender" value="女" />女
							</span>
						</p>

						<p>
							<label>出生年月：</label> <span class="field"><input
								id="empBirth" type="text" name="employee.empBirth" value="${employee.empBirth}"
								class="width100" /> </span>
						</p>

						<p>
							<label>电话号码：</label> <span class="field"><input
								type="text" style="width: 60%;" name="employee.empPhone" value="${employee.empPhone}"
								id="empPhone" /></span>
						</p>

						<p>
							<label>电子邮件：</label> <span class="field"><input
								type="text" style="width: 60%;" name="employee.empEmail" value="${employee.empEmail}"
								id="empEmail" /></span>
						</p>

						<p style="width: 100%">
							<label>地址：</label> <span class="field"><textarea cols="80"
									rows="5" name="employee.empAddress" id="empAddress"
									class="longinput">${employee.empAddress}</textarea></span>
						</p>
						<br />

						<p class="stdformbutton">
							<button class="submit radius2">提交信息</button>
						</p>
					</form>

				</div>
				<!--subcontent-->
				<br />
			</div>
			<!--contentwrapper-->

			<br clear="all" />

		</div>
		<!-- centercontent -->


	</div>
	<!--bodywrapper-->

</body>
</html>
